import { TOKEN_KEY } from "../config"

//缓存token
const setToken = (token: string): void => {
	uni.setStorageSync(TOKEN_KEY, token)
}

//从缓存中获取token
const getToken = () : string => {
	return uni.getStorageSync<string>(TOKEN_KEY) ?? ''
}

export {
	setToken,
	getToken,
}